//Design By Do Trung --- Email : trungqn19852003@yahoo.com
//Ngày Design :5/4/2011 5:00:32 PM
using System;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Linq;
using System.Collections.Generic;
 

	/// <summary>
	/// </summary>
	public class VideoClip_BA
	{
		public VideoClip_BA() {}
#region 'Variables And Properties'
		 private int int_IdVideo ;
		 public int IdVideo
			{
			 get 	
				{
					 return this.int_IdVideo;
				}
			 set 	
				{
					int_IdVideo=value;
				}
			}
		 private int int_IdChuyenMuc ;
		 public int IdChuyenMuc
			{
			 get 	
				{
					 return this.int_IdChuyenMuc;
				}
			 set 	
				{
					int_IdChuyenMuc=value;
				}
			}
		 private string string_TenFile ;
		 public string TenFile
			{
			 get 	
				{
					 return this.string_TenFile;
				}
			 set 	
				{
					string_TenFile=value;
				}
			}
		 private string string_HinhAnhMoTa ;
		 public string HinhAnhMoTa
			{
			 get 	
				{
					 return this.string_HinhAnhMoTa;
				}
			 set 	
				{
					string_HinhAnhMoTa=value;
				}
			}
		 private string string_GioiThieu ;
		 public string GioiThieu
			{
			 get 	
				{
					 return this.string_GioiThieu;
				}
			 set 	
				{
					string_GioiThieu=value;
				}
			}
		 private string string_NgayUpload ;
		 public string NgayUpload
			{
			 get 	
				{
					 return this.string_NgayUpload;
				}
			 set 	
				{
					string_NgayUpload=value;
				}
			}
		 private string string_NgayCapNhat ;
		 public string NgayCapNhat
			{
			 get 	
				{
					 return this.string_NgayCapNhat;
				}
			 set 	
				{
					string_NgayCapNhat=value;
				}
			}
		 private bool bool_TrangThai ;
		 public bool TrangThai
			{
			 get 	
				{
					 return this.bool_TrangThai;
				}
			 set 	
				{
					bool_TrangThai=value;
				}
			}
		 private string string_TenDangNhap ;
		 public string TenDangNhap
			{
			 get 	
				{
					 return this.string_TenDangNhap;
				}
			 set 	
				{
					string_TenDangNhap=value;
				}
			}
#endregion

		/// <summary>
		/// Inserts a record into the VideoClip table.
		/// <summary>
		/// <param name="IdVideo"></param>
		/// <param name="IdChuyenMuc"></param>
		/// <param name="TenFile"></param>
		/// <param name="HinhAnhMoTa"></param>
		/// <param name="GioiThieu"></param>
		/// <param name="NgayUpload"></param>
		/// <param name="NgayCapNhat"></param>
		/// <param name="TrangThai"></param>
		/// <param name="TenDangNhap"></param>
		/// <returns></returns>
		public bool Insert(SqlConnection SqlCnn)
		{
			bool boolInsert = false ;
			VideoClip_DA clsDA_VideoClip = new VideoClip_DA();
			clsDA_VideoClip.IdVideo=int_IdVideo;
			clsDA_VideoClip.IdChuyenMuc=int_IdChuyenMuc;
			clsDA_VideoClip.TenFile=string_TenFile;
			clsDA_VideoClip.HinhAnhMoTa=string_HinhAnhMoTa;
			clsDA_VideoClip.GioiThieu=string_GioiThieu;
			clsDA_VideoClip.NgayUpload=string_NgayUpload;
			clsDA_VideoClip.NgayCapNhat=string_NgayCapNhat;
			clsDA_VideoClip.TrangThai=bool_TrangThai;
			clsDA_VideoClip.TenDangNhap=string_TenDangNhap;

            boolInsert = clsDA_VideoClip.Insert(SqlCnn);
			clsDA_VideoClip = null ;
			return boolInsert;
		}

		/// <summary>
		/// Selects a single record from the VideoClip table.
		/// <summary>
		/// <returns>DataTable</returns>
		public DataTable Select(SqlConnection SqlCnn)
		{
			VideoClip_DA clsDA_VideoClip = new VideoClip_DA();
			DataTable dt = new DataTable();
            dt = clsDA_VideoClip.Select(SqlCnn);
			clsDA_VideoClip= null ;
			return dt;
		}

		/// <summary>
		/// Selects a single record from the VideoClip table.
		/// <summary>
		/// <returns>DataTable</returns>
		public DataTable SelectPrimaryKey(SqlConnection SqlCnn)
		{
			VideoClip_DA clsDA_VideoClip = new VideoClip_DA();
			DataTable dt = new DataTable();
			clsDA_VideoClip.IdVideo=int_IdVideo;

            dt = clsDA_VideoClip.SelectPrimaryKey(SqlCnn);
			clsDA_VideoClip= null;
			return dt;
			}

		/// <summary>
		/// Updates a record in the VideoClip table.
		/// <summary>
		/// <param name="IdVideo"></param>
		/// <param name="IdChuyenMuc"></param>
		/// <param name="TenFile"></param>
		/// <param name="HinhAnhMoTa"></param>
		/// <param name="GioiThieu"></param>
		/// <param name="NgayUpload"></param>
		/// <param name="NgayCapNhat"></param>
		/// <param name="TrangThai"></param>
		/// <param name="TenDangNhap"></param>
		public bool Update(SqlConnection SqlCnn)
		{
			bool boolUpdate = false ;
			VideoClip_DA clsDA_VideoClip = new VideoClip_DA();
			clsDA_VideoClip.IdVideo=int_IdVideo;
			clsDA_VideoClip.IdChuyenMuc=int_IdChuyenMuc;
			clsDA_VideoClip.TenFile=string_TenFile;
			clsDA_VideoClip.HinhAnhMoTa=string_HinhAnhMoTa;
			clsDA_VideoClip.GioiThieu=string_GioiThieu;
			clsDA_VideoClip.NgayUpload=string_NgayUpload;
			clsDA_VideoClip.NgayCapNhat=string_NgayCapNhat;
			clsDA_VideoClip.TrangThai=bool_TrangThai;
			clsDA_VideoClip.TenDangNhap=string_TenDangNhap;

            boolUpdate = clsDA_VideoClip.Update(SqlCnn);
			clsDA_VideoClip = null ;
			return boolUpdate;
		}

		/// <summary>
		/// Deletes a record from the VideoClip table by a composite primary key.
		/// <summary>
		public bool Delete(SqlConnection SqlCnn)
		{
			bool boolDelete = false ;
			VideoClip_DA clsDA_VideoClip = new VideoClip_DA();
			clsDA_VideoClip.IdVideo=int_IdVideo;

            boolDelete = clsDA_VideoClip.Delete(SqlCnn);
			clsDA_VideoClip = null ;
			return boolDelete;
		}
	}

